<template>
  <div class="payment-container">
    <div v-html="data" class="payment-box"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: "",
    };
  },
  mounted() {
    let form = this.$route.query.htmlData;
    this.data = form;
    this.$nextTick(() => {
      document.forms[0].submit();
    });
  },
};
</script>

<style lang="less" scoped>
.payment-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f8fa;
}

.payment-box {
  width: 500px;
  min-height: 300px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 40px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 auto;
  transition: box-shadow 0.3s;
}

.payment-box form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.payment-box input,
.payment-box button {
  margin: 10px 0;
}
</style>